package com.jh.tools.base;

import java.util.Map;


import rx.Observable;

/**
 * Created by niejiahuan on 2016/5/31.
 */
public abstract class BasePresenter<E extends BaseModel, T> {
    public BaseActivity mContext;
    public E mModel;
    public T mView;

    public void setVM(T v, E m,BaseActivity context) {
        this.mView = v;
        this.mModel = m;
        this.mContext=context;
        this.onStart();
    }
    /**
     * 获取数据
     * @param params 参数集
     * @return
     */
    public  Observable getDate(Map<String,String> params){
        return mModel.getDate(params);
    };
    public abstract void onStart();

    public void onDestroy(){
    }
}
